import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const ListSelector = require('./pages/vue-list-selector-test.vue')
const Home = require('./pages/home.vue')

const routes = [{
  path: '/home',
  name: 'home',
  component: Home
}, {
  path: '/list-selector',
  component: ListSelector
}, {
  path: '*',
  redirect: {
    name: 'home'
  }
}]

const router = new VueRouter({
  mode: 'history', // h5 history
  routes
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  template: '<App/>',
  router,
  components: {
    App
  }
})
